<%@page import="model.entity.role.Users"%>
<%@page import="model.entity.OrderDetails"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="headerLink.jsp"%>
<title>Thanh Toán</title>

<script type="text/javascript">
$(function() {
	$("#chechOutSub").button({ icons: { primary: "ui-icon-check" }});
});
</script>
</head>
<body>

	<%
		Users user = (Users) session.getAttribute("user");
		if (user == null) response.sendRedirect("DanhNhapDangKy.jsp");
		else {
	
		ArrayList<OrderDetails> cart = (ArrayList<OrderDetails>) session.getAttribute("cart");
		if(cart == null) cart = new ArrayList<OrderDetails>();
		
	%>
	<div id="nen">
		
		<jsp:include page="menuLeft.jsp"></jsp:include>		
			
		<div id="khungGiua">
			<jsp:include page="header.jsp"></jsp:include>
			
			<div style="clear: left;"></div>
			
			<div id="noiDung">

				<!-- khung chua hang -->
				<div id="khungSanPham">
					<!-- thanh ngang 1 -->
					<div id="danhSachSanPham" class="danhSachSanPhamTren" style="text-align: center;">
						<a href="#" style="font-size: 30pt;font-weight: bold;">Thanh Toán </a>
					</div>
					
					<!-- khung thoi trang nam -->
					<div id="thoiTrang">
					<form action="../OrderContr" method="post">
					<table style="width: 60%;margin: auto;height: 500px;">
						<tr>
							<td>Số điệnh thoai: </td>
							<td><input type="text" name="phone" required="required" value="<%=user.getPhone()%>"/></td>
						</tr>
						<tr>
							<td>Địa chỉ: </td>
							<td><input type="text" name="address" required="required" value="<%=user.getAddress()%>"/></td>
						</tr>
						<tr>	
							<td>Ghi chú: </td>
							<td><textarea name="comment"></textarea></td>
						</tr>
						<tr>
							<td>
								<%for(OrderDetails detail : cart) { %>
								<% } %>
							</td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<input id="chechOutSub" type="submit" value="Hoàn Thành"/>
							</td>
						</tr>
					</table>
					</form>
					</div>
					<div style="clear: left;"></div>
					

				</div>


			</div>
			<!-- dong the noi dung -->

		</div>
		
			<!-- menu nu -->
			
				<jsp:include page="menuRight.jsp"></jsp:include>
			
	</div>
	<% } %>

</body>
</html>